﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Ordering.API.ViewModel
{
    public class OrderRequest
    {
        /// <summary>
        /// 订单类型
        /// </summary>
        public int OrderType { get; set; }
        /// <summary>
        /// 客户编码
        /// </summary>
        public string CustomerCode { get; set; }
        /// <summary>
        /// 省
        /// </summary>
        public String Province { get; set; }
        /// <summary>
        /// 市
        /// </summary>
        public String City { get; set; }
        /// <summary>
        /// 区
        /// </summary>
        public String Area { get; set; }
        /// <summary>
        /// 街道（镇）
        /// </summary>
        public String Town { get; set; }
        /// <summary>
        /// 详细地址
        /// </summary>
        public string DetailedAddress { get; set; }
        /// <summary>
        /// 扩展字段（订单为取快递类型则为：快递店地址）
        /// </summary>
        public string ExtendField { get;  set; }
        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
        /// <summary>
        /// 预约时间
        /// </summary>
        public DateTime AppointmentTime { get; set; }
        /// <summary>
        /// 经度
        /// </summary>
        public decimal? Latitude { get; set; }
        /// <summary>
        /// 纬度
        /// </summary>
        public decimal? Longitude { get; set; }
        /// <summary>
        /// 订单明细
        /// </summary>
        public IEnumerable<OrderItemRequest> OrderItems { get; set; }
    }
    public class OrderItemRequest
    {
        /// <summary>
        /// 产品代码
        /// </summary>
        public string ProductCode { get; set; }
        /// <summary>
        /// 扩展字段(快递类型)
        /// </summary>
        public string ExtendField { get; set; }
        /// <summary>
        /// 扩展字段(取件码)
        /// </summary>
        public string ExtendField2 { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public int Num { get; set; }
    }
    /// <summary>
    /// 取消订单
    /// </summary>
    public class CancelOrderRequest
    {
        /// <summary>
        /// 订单号
        /// </summary>
        public string OrderNO { get; set; }
        /// <summary>
        /// 原因
        /// </summary>
        public string Reason { get; set; }
    }
    /// <summary>
    /// 接收订单
    /// </summary>
    public class ReceiveOrderRequest
    {
        /// <summary>
        /// 订单号
        /// </summary>
        public string OrderNO { get; set; }
    }
    /// <summary>
    /// 配送订单
    /// </summary>
    public class DeliveryOrderRequest
    {
        /// <summary>
        /// 订单号
        /// </summary>
        public string OrderNO { get; set; }
    }
    /// <summary>
    /// 完成订单
    /// </summary>
    public class CompletedOrderRequest
    {
        /// <summary>
        /// 订单号
        /// </summary>
        public string OrderNO { get; set; }
    }
}
